Optimal. Leaf size=15 \[ -\frac {x}{a}-\frac {\tanh ^{-1}(\cos (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3973, 3855}
\begin {gather*} -\frac {x}{a}-\frac {\tanh ^{-1}(\cos (x))}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3973
Rubi steps
\begin {align*} \int \frac {\cot ^2(x)}{a+a \csc (x)} \, dx &=\frac {\int (-a+a \csc (x)) \, dx}{a^2}\\ &=-\frac {x}{a}+\frac {\int \csc (x) \, dx}{a}\\ &=-\frac {x}{a}-\frac {\tanh ^{-1}(\cos (x))}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 30, normalized size = 2.00 \begin {gather*} -\frac {x}{a}-\frac {\log \left (\cos \left (\frac {x}{2}\right )\right )}{a}+\frac {\log \left (\sin \left (\frac {x}{2}\right )\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 18, normalized size = 1.20
method | result | size |
default | \(\frac {-2 \arctan \left (\tan \left (\frac {x}{2}\right )\right )+\ln \left (\tan \left (\frac {x}{2}\right )\right )}{a}\) | \(18\) |
risch | \(-\frac {x}{a}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{a}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{a}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 30, normalized size = 2.00 \begin {gather*} -\frac {2 \, \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} + \frac {\log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.98, size = 25, normalized size = 1.67 \begin {gather*} -\frac {2 \, x + \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cot ^{2}{\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 17, normalized size = 1.13 \begin {gather*} -\frac {x}{a} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.28, size = 45, normalized size = 3.00 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {4}{4\,\mathrm {tan}\left (\frac {x}{2}\right )+4}-\frac {4\,\mathrm {tan}\left (\frac {x}{2}\right )}{4\,\mathrm {tan}\left (\frac {x}{2}\right )+4}\right )}{a}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________